﻿using System;
using DapperExtensions.Mapper;
using Newtonsoft.Json;

namespace ZilLion.Service.WeChatMall.Domain.Entitys.AppInfo
{
    public class AppRaInfoEntity
    {
        /// <summary>
        ///     商户ID（使用微信APPID作为商户ID）
        /// </summary>

        [JsonProperty("appid")]
        public string AppId { get; set; }

        /// <summary>
        ///     单笔订单最大可付款
        /// </summary>
        [JsonProperty("maxorderpaymy")]
        public decimal MaxOrderPayMy { get; set; }

        /// <summary>
        ///     修改时间
        /// </summary>
        [JsonProperty("updatedtime")]
        public DateTime UpdatedTime { get; set; }

        /// <summary>
        ///     修改人
        /// </summary>
        [JsonProperty("updater")]
        public long Updater { get; set; }
    }

    public class AppRaInfoEntityMapper : ClassMapper<AppRaInfoEntity>
    {
        public AppRaInfoEntityMapper()
        {
            Table("apprainfo");
            Map(f => f.AppId).Column("appid").Key(KeyType.Assigned);
            Map(f => f.MaxOrderPayMy).Column("maxorderpaymy");
            Map(f => f.UpdatedTime).Column("updatedtime");
            Map(f => f.Updater).Column("updater");
        }
    }
}